<nz-tab>
    <ng-template #nzTabHeading>
        云课程管理
    </ng-template>
    <nz-list style="padding-top: 30px" [nzLoading]="loading" [nzDataSource]="list" [nzGrid]="{gutter: 24, lg: 6, md: 8, sm: 12, xs: 24 }">
        <ng-template #item let-item>
            <nz-list-item>
                <nz-card nzHoverable style="width: 100%;position: relative">
                    <div class="pro-shadow" *ngIf="item.p_name != ''">
                        <a (click)="preview(item.p_id,'course',true)">
                            <i class="anticon anticon-eye"></i>
                            <br />预览</a>
                        <a [routerLink]="['../xiangmu/full/add-project/','course', item.p_id ]">
                            <i class="anticon anticon-edit"></i>
                            <br />编辑</a>
                        <!--<a (click) = ''><i  class="anticon anticon-plus" ></i><br />引用</a>-->
                        <a (click)="deleteProjectById(item.p_id)">
                            <i class="anticon anticon-delete"></i>
                            <br />删除</a>
                    </div>
                    <ng-container *ngIf="item.p_name == ''">
                        <!--[routerLink]="['../../add-project', 0]"-->
                        <ng-template #cover>
                            <img alt="'添加项目'" [routerLink]="['../xiangmu/full/add-project/','course', 0]" src="./assets/img/addPro.png">
                        </ng-template>
                        <nz-card-meta [nzTitle]="'添加项目'" [nzDescription]="item.subDescription">
                        </nz-card-meta>
                    </ng-container>
                    <ng-container *ngIf="item.p_name!=''" style="width: 100%">
                        <ng-template #cover>
                            <div [appAutobg]="item.p_image ? (IP_PORT + item.p_image):(IP_PORT + item.p_image)">

                            </div>
                        </ng-template>
                        <nz-card-meta [nzTitle]="nzTitle" [nzDescription]="item.subDescription">
                            <ng-template #nzTitle>
                                <a routerLink="" style="color: #656565;">{{item.p_name}}</a>
                            </ng-template>
                        </nz-card-meta>

                    </ng-container>
                    <div class="card-item-content" [appMargin] top="10">
                        <span class="text-grey">{{item.p_date}}</span>
                    </div>
                </nz-card>
            </nz-list-item>
        </ng-template>
    </nz-list>
    <nz-pagination *ngIf="list?.length!==0" class="pull-right" appMargin bottom="20" [(nzPageSize)]="pageSize" [(nzPageIndex)]="pageIndex"
        (nzPageIndexChange)="getData()" [nzTotal]="total"></nz-pagination>
</nz-tab>
